﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Marmat.Foundation
{
    /// <summary>
    /// 选择窗体的列实体
    /// </summary>
    public class SelectionRecordColumn : System.ComponentModel.CancelEventArgs
    {

        public SelectionRecordColumn(string columnName)
        {
            this.ColumnName = columnName;
        }

        public SelectionRecordColumn(string columnName, string caption)
        {
            this.ColumnName = columnName;
            this.Caption = caption;
        }

        internal SelectionRecordColumn(string columnName, string caption, int width)
        {
            this.ColumnName = columnName;
            this.Caption = caption;
            this.Width = width;
        }

        /// <summary>
        /// 列名
        /// </summary>
        public string ColumnName { get; }

        /// <summary>
        /// 获取或设置是否开启列搜索。
        /// </summary>
        public bool IsSearch { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string Caption { get; set; }

        /// <summary>
        /// 宽度
        /// </summary>
        public int Width { get; set; } = -1;

        /// <summary>
        /// 显示序号
        /// </summary>
        public int Index { get; set; }
    }
}
